using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlatRedBall;
using FlatRedBall.Input;
using FlatRedBall.AI.Pathfinding;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Graphics.Particle;
using FlatRedBall.Math.Geometry;
using FlatRedBall.Math.Splines;



#if FRB_XNA || SILVERLIGHT
using Keys = Microsoft.Xna.Framework.Input.Keys;
using Vector3 = Microsoft.Xna.Framework.Vector3;
using Texture2D = Microsoft.Xna.Framework.Graphics.Texture2D;


#endif

namespace WinRos_Xna.Entities
{
	public partial class Create
	{
        Keyboard keyboard = InputManager.Keyboard;
        Xbox360GamePad controller1 = InputManager.Xbox360GamePads[0];

		private void CustomInitialize()
		{


		}

		private void CustomActivity()
		{
            /*
            if (keyboard.KeyDown(Keys.Up) || controller1.LeftStick.Position.Y > 0.5f)
            {

                //CreateInstance.Velocity = new Vector3(0, 5, 0);

                String message = "{\"receiver\":\"/cmd_vel\",\"msg\":{\"linear\":{\"x\":0.5,\"y\":0.0,\"z\":0.0}, \"angular\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}},\"type\":\"geometry_msgs/Twist\"}";
                //ros.publish(message);
            }

            else if (keyboard.KeyDown(Keys.Down) || controller1.LeftStick.Position.Y < -0.5f)
            {
                //CreateInstance.Velocity = new Vector3(0, -5, 0);
            }
            else if (keyboard.KeyDown(Keys.A) || controller1.ButtonPushed(Xbox360GamePad.Button.LeftTrigger))
            {
                String message = "{\"receiver\":\"/cmd_vel\",\"msg\":{\"linear\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}, \"angular\":{\"x\":0.0,\"y\":0.0,\"z\":-0.5}},\"type\":\"geometry_msgs/Twist\"}";
                //ros.publish(message);
            }
            else if (keyboard.KeyDown(Keys.D) || controller1.ButtonPushed(Xbox360GamePad.Button.RightTrigger))
            {
                String message = "{\"receiver\":\"/cmd_vel\",\"msg\":{\"linear\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}, \"angular\":{\"x\":0.0,\"y\":0.0,\"z\":0.5}},\"type\":\"geometry_msgs/Twist\"}";
                //ros.publish(message);
            }
            else
            {
                //CreateInstance.Velocity = new Vector3(0, 0, 0);

                String message = "{\"receiver\":\"/cmd_vel\",\"msg\":{\"linear\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}, \"angular\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}},\"type\":\"geometry_msgs/Twist\"}";
                //ros.publish(message);
            }
            */
		}

		private void CustomDestroy()
		{


		}

        private static void CustomLoadStaticContent(string contentManagerName)
        {


        }
	}
}
